// File chooser button
// Copyright 2006 (C) Ralph Thomas

#ifndef MISSION_VIEW_FILE_BUTTON_H
#define MISSION_VIEW_FILE_BUTTON_H

#include <factory.hpp>

namespace view {
	//
	/// The file_button is a special button that shows a filename
	/// or pathname with icon. When clicked it opens a file dialog
	/// and allows a file or folder to be selected.
	///
	/// \param	params	the parameters to create with, this only
	///			needs to include a "bind:" parameter.
	/// \param	parent	the parent for this widget.
	/// \param	token	the token to create with.
	/// \param	dir	if true, then directories are looked for,
	///			otherwise only files are looked for.
	/// \return	a new file_button widget.
	//
	adobe::widget_node_t file_button_factory(
		const adobe::dictionary_t&	params,
		const adobe::widget_node_t&	parent,
		const adobe::factory_token_t&	token,
	        bool				dir );
};

#endif

